import {Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy} from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";

@Component({
  selector: 'seed-crowd-protocol',
  templateUrl: './crowd-protocol.component.html',
  styleUrls: ['./crowd-protocol.component.scss'],
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class CrowdProtocolComponent implements OnInit {

  public crowdCode: string;

  constructor(public router: Router,
              private route: ActivatedRoute,
  ) {
    this.route.queryParams.subscribe(param => {
      this.crowdCode = param['crowdCode'];
    });
  }

  ngOnInit() {

  }

  goToStep1() {
    this.router.navigate([`/crowd/step-1`], {queryParams: {crowdCode: this.crowdCode}});
  }

}
